import request from '@u/request.js'

// 会员管理

// 查询会员列表
export function vipList(data) {
  return request({
    url: '/member/api/member/getMemberList',
    method: 'post',
    data
  })
}

// 删除会员
export function deleteVip(data) {
  return request({
    url: '/member/api/member/delMemberDetail',
    method: 'post',
    data
  })
}

// 查询会员详情
export function getVipDetail(data) {
  return request({
    url: '/member/api/member/getMemberDetail',
    method: 'post',
    data
  })
}

// 获取积分规则
export function getMemberPoints(data) {
  return request({
    url: '/member/api/member/getMemberPoints',
    method: 'post',
    data
  })
}

// 会员积分查询与金额转换
export function getPoints(data) {
  return request({
    url: '/member/api/member/getPoints',
    method: 'post',
    data
  })
}

// 查询积分修改记录
export function queryUpdateRecord(data) {
  return request({
    url: '/member/api/member/queryUpdateRecord',
    method: 'post',
    data
  })
}

// 会员管理-会员注册
export function registerMember(data) {
  return request({
    url: '/member/api/member/registerMember',
    method: 'post',
    data
  })
}

// 设置积分规则
export function setMemberPoints(data) {
  return request({
    url: '/member/api/member/setMemberPoints',
    method: 'post',
    data
  })
}

// 更新会员积分
export function updateMember(data) {
  return request({
    url: '/member/api/member/updateMember',
    method: 'post',
    data
  })
}
